
// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作
const install = (Vue, vm) => {
	
	// 参数配置对象
	const config = vm.vuex_config;
	
	console.log(config.baseUrl,'777777777777');
	
	// 将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下
	vm.$u.api = {
		getUserInfo: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/wx/auth/doLoginByWeixin', params),
		
		getIp: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/pv/getIp', params),
		pass: (params = {}) => vm.$u.postJson(config.baseUrl1+'/pass', params),

		userinfo: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/user/info', params),
		
		domain: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/pv/domain', params),
		friend: (params = {}) => vm.$u.postJson(config.baseUrl1+'/friend ', params),
		sign: (params = {}) => vm.$u.postJson(config.baseUrl1+'/sign ', params),
		
		
		
		
			getinput: (params = {}) => vm.$u.postJson(config.baseUrl1+'/input', params),
		
		applist: (params = {}) => vm.$u.postJson(config.baseUrl1+'/applist', params),
		
		
		
		pvadd: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/pv/add', params),
		fetchGameQrcode: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/user/fetchGameQrcode', params),
		useradd: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/user/add', params),
		redPacket: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/redPacket/receive', params),
		extractToMoney: (params = {}) => vm.$u.postJson(config.baseUrl+'/hpjy/wx/pay/extract', params),
		// 已推广人数
		subordinate: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/user/subordinate', params),
		// 返佣记录
		fetchRebate: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/rebate/list', params),
		// 佣金提取提现
		rebateExtract: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/rebateExtract/list', params),
		// 红包提取记录
		redPacketExtract: (params = {}) => vm.$u.get(config.baseUrl+'/hpjy/redPacketExtract/list', params),

		getConfig: (params = {}) => vm.$u.get('https://shengmu-api.osmk.cn/shengmu-server/'+'/app/common/config', params),

		



		
		
		



		
		// updateusermobile: (params = {}) => vm.$u.postJson(config.baseUrl+'/auth/wxa/roumeiji/updateusermobile', params),
		// eventhistory: (params = {}) => vm.$u.get(config.baseUrl+'/api/event/eventhistory', params),
		// userModify: (params = {}) => vm.$u.postJson(config.baseUrl+'/api/user/modify', params),
		// // 创建事件历史
		// createEventhistory: (params = {}) => vm.$u.postJson(config.baseUrl+'/api/event/eventhistory/create', params),
		// profilemodify: (params = {}) => vm.$u.postJson(config.baseUrl+'/api/user/profile/modify', params),
		// // detailinfo: (id) => vm.$u.get(config.baseUrl+`/info/${id}`),
		
		// // detailinfo: (params = {}) => vm.$u.get(config.baseUrl+'/info', params),
		// detailinfo: (id) => vm.$u.get(config.baseUrl+`/api/event/eventhistory/info/${id}`),
		
	};
}

export default {
	install
}